#!/usr/bin/env python

import datasource
#import pydap
		
class DAPDataSource(DataSource):
	"""A DAP based DataSource. The meta data are assumed to be stored as the attributes of the data"""
	def __init__(self, dapUrl=None, dapKey=None, etag=None):
		DataSource(etag)
        # The DAP file URL
		assert dapUrl!=None
		self.dapUrl = dapUrl
		# The DAP dataset key
		assert dapKey!=None
		self.dapKey = dapKey
		
	def getMetaData(self):
		"""Return the key:value dictionary containing all the metadata associated with this DataSource."""
		raise NotImplementedError
		
	def getData(self, slice=None):
		"""Return numpy data for this DataSource
		@param slice the slice that we want to read from the source
		@return the slice of data if defined, or all the data if slice==None
		"""
		raise NotImplementedError